package com.itheima.advice;


import com.itheima.pojo.MyResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyControllerAdvice {

    @ExceptionHandler(Exception.class)
    public MyResponseResult<String> doMyException(Exception e){
        e.printStackTrace();
       return MyResponseResult.error("服务器升级中。");



    }

}
